<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title></title>
    <script src="https://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
        <style>
            img{
                width: 1000px;
                height: 500px;
            }
        </style>
</head>
<body>
        
      <div class="box">

        <div> <img src="/3.jpg"> </div>
      <div>
          <p>距离本场秒杀结束还剩:</p>
          <p id="d"></p>
          <p id="h"></p>
          <p id="m"></p>
          <p id="s"></p>
      </div> 
      </div> 
      

      <script>
          $(function()
          {
              var endTime = new Date("2021-9-25 18:00:00");
              var endTimeNum = endTime.getTime();
              //定时器
              t = setInterval(() => {
             var nowTime = new Date();
              //获取时间差       
              var remaTime = parseInt((endTime-nowTime.getTime())/1000);
              if(remaTime>0)
              {
                 d= parseInt(remaTime/86400);
                 h= parseInt(remaTime/3600)%24;
                 m= parseInt(remaTime/60)%60;
                 s= parseInt(remaTime%60);
              }
              else
              {
                  clearInterval(t);
              }

                   $("#d").html(d);
                   $("#h").html(h);
                   $("#m").html(m);
                   $("#s").html(s);


            }, 1000);


          })
      </script>
      
</body>
</html>